home *** CD-ROM | disk | FTP | other *** search
- /*
- File: Scrollbar.h
-
- Contains: Scrollbar class implementation
-
- Written by: Steve Smith
-
- Copyright: © 1995 by Apple Computer, Inc., all rights reserved.
- */
-
- #ifndef _SCROLLBAR_
- #define _SCROLLBAR_
-
- // --- PanelEditor Includes ---
-
- #ifndef _PANELEDITORUTILS_
- #include "PanelEditorUtils.h"
- #endif
-
- // --- OpenDoc Includes ---
-
- #ifndef _ODTYPES_
- #include <ODTypes.h>
- #endif
-
- #ifndef SOM_ODFacet_xh
- #include <Facet.xh>
- #endif
-
- // -- Macintosh Includes --
-
- #ifndef __CONTROLS__
- #include <Controls.h>
- #endif
-
- //==============================================================================
- // CScrollbar
- //==============================================================================
-
- class CScrollbar {
-
- public:
- CScrollbar();
- virtual ~CScrollbar();
-
- void InitScrollbar(Environment* ev, ODFacet* facet, Rect ctrlRect);
- void Size(ODUShort width, ODUShort height);
- void Dirty(ODUShort numItems);
- void Draw();
- void Adjust(ODUShort numItems);
- ODBoolean HitTest(Point where);
- void Scroll(Environment* ev, ODFrame* frame, Point where);
-
- protected:
- void SetLimits(ODUShort max, ODUShort min = 0);
- void Size();
-
- private:
-
- ODBoolean fInited;
- ODBoolean fDirty;
- ODUShort fNumItems;
- ControlHandle fControl;
- WindowPtr fWindow;
- ODSShort fPartCode;
- ODFacet* fFacet;
- };
-
- #endif
-